Optimal. Leaf size=100 \[ \frac{(a+4 b) \log (1-\tanh (c+d x))}{4 d}-\frac{(a-4 b) \log (\tanh (c+d x)+1)}{4 d}+\frac{\sinh ^2(c+d x) (a \tanh (c+d x)+b)}{2 d}+\frac{a \tanh (c+d x)}{2 d}+\frac{b \tanh ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.117426, antiderivative size = 100, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {3663, 1804, 1802, 633, 31} \[ \frac{(a+4 b) \log (1-\tanh (c+d x))}{4 d}-\frac{(a-4 b) \log (\tanh (c+d x)+1)}{4 d}+\frac{\sinh ^2(c+d x) (a \tanh (c+d x)+b)}{2 d}+\frac{a \tanh (c+d x)}{2 d}+\frac{b \tanh ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3663
Rule 1804
Rule 1802
Rule 633
Rule 31
Rubi steps
\begin{align*} \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (a+b x^3\right )}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac{\sinh ^2(c+d x) (b+a \tanh (c+d x))}{2 d}+\frac{\operatorname{Subst}\left (\int \frac{x \left (-2 b-a x-2 b x^2\right )}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{2 d}\\ &=\frac{\sinh ^2(c+d x) (b+a \tanh (c+d x))}{2 d}+\frac{\operatorname{Subst}\left (\int \left (a+2 b x-\frac{a+4 b x}{1-x^2}\right ) \, dx,x,\tanh (c+d x)\right )}{2 d}\\ &=\frac{a \tanh (c+d x)}{2 d}+\frac{b \tanh ^2(c+d x)}{2 d}+\frac{\sinh ^2(c+d x) (b+a \tanh (c+d x))}{2 d}-\frac{\operatorname{Subst}\left (\int \frac{a+4 b x}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{2 d}\\ &=\frac{a \tanh (c+d x)}{2 d}+\frac{b \tanh ^2(c+d x)}{2 d}+\frac{\sinh ^2(c+d x) (b+a \tanh (c+d x))}{2 d}+\frac{(a-4 b) \operatorname{Subst}\left (\int \frac{1}{-1-x} \, dx,x,\tanh (c+d x)\right )}{4 d}-\frac{(a+4 b) \operatorname{Subst}\left (\int \frac{1}{1-x} \, dx,x,\tanh (c+d x)\right )}{4 d}\\ &=\frac{(a+4 b) \log (1-\tanh (c+d x))}{4 d}-\frac{(a-4 b) \log (1+\tanh (c+d x))}{4 d}+\frac{a \tanh (c+d x)}{2 d}+\frac{b \tanh ^2(c+d x)}{2 d}+\frac{\sinh ^2(c+d x) (b+a \tanh (c+d x))}{2 d}\\ \end{align*}
Mathematica [A] time = 0.106663, size = 69, normalized size = 0.69 \[ \frac{a (-c-d x)}{2 d}+\frac{a \sinh (2 (c+d x))}{4 d}-\frac{b \left (-\sinh ^2(c+d x)+\text{sech}^2(c+d x)+4 \log (\cosh (c+d x))\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.041, size = 79, normalized size = 0.8 \begin{align*}{\frac{a\cosh \left ( dx+c \right ) \sinh \left ( dx+c \right ) }{2\,d}}-{\frac{ax}{2}}-{\frac{ac}{2\,d}}+{\frac{b \left ( \sinh \left ( dx+c \right ) \right ) ^{4}}{2\,d \left ( \cosh \left ( dx+c \right ) \right ) ^{2}}}-2\,{\frac{b\ln \left ( \cosh \left ( dx+c \right ) \right ) }{d}}+{\frac{b \left ( \tanh \left ( dx+c \right ) \right ) ^{2}}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.58441, size = 190, normalized size = 1.9 \begin{align*} -\frac{1}{8} \, a{\left (4 \, x - \frac{e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac{e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac{1}{8} \, b{\left (\frac{16 \,{\left (d x + c\right )}}{d} - \frac{e^{\left (-2 \, d x - 2 \, c\right )}}{d} + \frac{16 \, \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} - \frac{2 \, e^{\left (-2 \, d x - 2 \, c\right )} - 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 1}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 2 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.35088, size = 2453, normalized size = 24.53 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \sinh ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.26631, size = 192, normalized size = 1.92 \begin{align*} -\frac{4 \,{\left (a - 4 \, b\right )} d x -{\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 8 \, b e^{\left (2 \, d x + 2 \, c\right )} - a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} -{\left (a e^{\left (2 \, d x + 10 \, c\right )} + b e^{\left (2 \, d x + 10 \, c\right )}\right )} e^{\left (-8 \, c\right )} + 16 \, b \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) - \frac{8 \,{\left (3 \, b e^{\left (4 \, d x + 4 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, b\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]